public class Main {


    public static void main(String[] args) {
        MyLinkedList list = new MyLinkedList();
        list.addLast(1);
        list.addLast(1);
        list.addLast(2);
        list.addLast(1);
        list.addLast(2);
        list.addLast(1);
        list.addLast(1);
        list.display();
        System.out.println();

        list.removeAllkey(1);

        list.display();
    }
    public static void main2(String[] args) {
       MyLinkedList list = new MyLinkedList();
        list.addIndex(2,10);
        list.addIndex(0,20);
        list.addIndex(0,50);
        list.addIndex(0,60);
        list.addIndex(0,40);
        list.display();
        System.out.println();
        list.remove(50);
        list.remove(40);
        list.remove(10);
        list.remove(100);


        list.display();

        /*System.out.println(list.contains(10));
        System.out.println(list.contains(60));*/


    }
    public static void main1(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(3);
        myLinkedList.addFirst(4);
        myLinkedList.addFirst(5);
        myLinkedList.display();
        System.out.println();
        myLinkedList.addLast(0);
        myLinkedList.addLast(-1);
        myLinkedList.addLast(-2);
        myLinkedList.display();
        System.out.println();
        myLinkedList.addIndex(2,999);
        myLinkedList.addIndex(2,888);
        myLinkedList.addIndex(10,666);
        myLinkedList.display();
    }
}
